package com.example.address.DTO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LocationResultAddress extends LocationResultBase {
    public String address;

    public LocationResultAddress(Double longitude, Double latitude, String address) {
        this.longitude = longitude;
        this.latitude = latitude;
        this.address = address;
    }

    @Override
    public String toString() {
        return String.format("(%f,%f):%s", longitude, latitude, address);
    }

    @Override
    public int hashCode() {
        return Objects.hash(address, longitude, latitude, 1);
    }
}
